
menu menubar {
  .=[haxedro]= Dialog:/dialog -md dialog dialog
}

alias gettotnicks {
  var %i $chan(0) , %tot
  while (%i) {
    %tot = $calc(%tot + $nick($chan(%i),0))
    .dec %i
  }
  .amsg I am opp'd in $chan(0) $+ / $+ $chan(0) chan'z and have power over %tot of you little biatch's. | /echo -a I am opp'd in $chan(0) $+ / $+ $chan(0) chan'z and have power over %tot of you little biatch's.
}

dialog dialog {
  title "-[haxedro]- mIRC - MSN Client Manager"
  option dbu
  size -1 -1 147 200
  tab "Channel/Script",1, 1 1 145 182
  tab "Script/Away",60
  tab "Mp3/stuff",109 [, 1 8 10 20]
  button "&Done",2, 13 190 60 9, OK
  button "&Cancel",3, 73 190 60 9, CANCEL
  text "Topic:",4, 6 19 20 10, tab 1
  edit "",5, 31 18 110 10, read, autohs, left, tab 1
  text "OnJoin:",6, 4 29 20 10, tab 1
  edit "",7, 31 28 110 10, read, autohs, left, tab 1
  text "OnPart:",8, 4 39 20 10, tab 1
  edit "",9, 31 38 110 10, read, autohs, left, tab 1
  text "&Spec:",10, 8 51 15 9, tab 1
  check "+m",11, 31 50 11 9, push, tab 1
  text "&Knocks:",12, 3 60 20 10, tab 1
  check "+u",13, 31 59 11 9, push, tab 1
  text "&Invite:",14, 8 69 23 10, tab 1
  check "+i",15, 31 68 11 9, push, tab 1
  text "&Hidden:",16, 4 78 23 10, tab 1
  check "+h",17, 31 77 11 9, push, tab 1
  text "&Whisper:",18, 2 87 25 10, tab 1
  check "+w",19, 31 86 11 9, push, tab 1
  text "&Ext Msg:",20, 2 96 25 10, tab 1
  check "+n",21, 31 95 11 9, push, tab 1
  text "&Op Topic:",22, 2 105 25 10, tab 1
  check "+t",23, 31 104 11 9, push, tab 1
  text "&Limit:",24, 11 114 20 9, tab 1
  button "+l",25, 31 113 11 9, tab 1
  edit "",26, 43 113 15 10, autohs, tab 1
  text "&Key:",27, 12 123 15 10, tab 1
  button "+k",28, 31 122 11 9, tab 1
  edit "",29, 43 122 25 10, autohs, tab 1
  box "Propz",31, 43 48 98 65, tab 1
  text "Q Key:",32, 45 58 25 9, tab 1
  edit "",33, 62 57 74 10, read, autohs, left, tab 1
  text "O Key:",34, 45 68 25 9, tab 1
  edit "",35, 62 67 74 10, read, autohs, left, tab 1
  text "Language:",36, 45 78 30 9, tab 1
  edit "",37, 72 77 15 10, read, autohs, left, tab 1
  text "Q Key:",38, 45 88 25 9, tab 1
  edit "",39, 62 87 60 10, autohs, tab 1
  button "set",40, 125 87 11 9, tab 1
  text "O Key",41, 45 98 25 9, tab 1
  edit "",42,  62 97 60 10, autohs, tab 1
  button "set",43, 125 97 11 9, tab 1
  box "Stuff",44, 2 131 142 50, tab 1
  text "Topic:",45, 19 140 20 9, tab 1
  edit "",46, 37 139 92 10, autohs, tab 1 
  button "set",47, 130 139 11 9, tab 1
  text "OnJoin Msg:",48, 5 150 30 9, tab 1
  edit "",49, 37 149 92 10, autohs, tab 1
  button "set",50, 130 149 11 9, tab 1
  text "OnPart Msg:",51, 5 160 30 9, tab 1
  edit "",52, 37 159 92 10, autohs, tab 1
  button "set",53, 130 159 11 9, tab 1
  text "Language:",54, 9 170 30 9, tab 1
  edit "",55, 37 169 30 10, autohs, tab 1
  button "set",56, 130 169 11 9, tab 1
  button "&Info",57, 84 115 44 8, tab 1
  button "Enter QKey",58, 77 123 30 9, tab 1
  button "Enter OKey",59, 107 123 30 9, tab 1
  box "Away&sys",61, 3 14 141 45, tab 60
  text "Away System Message:",62, 42 18 70 9, tab 60
  edit "",63, 13 26 119 10, autohs, tab 60
  button "&Away",64, 13 48 45 9, tab 60
  button "&Info",65, 58 48 30 9, tab 60
  button "&Back",66, 88 48 45 9, tab 60
  text "Time:",67, 42 38 25 9, tab 60
  edit "",68, 58  37 29 10, autohs, tab 60
  text "(seconds)",69, 90 38 25 9, tab 60
  box "Access",70, 3 60 65 83, tab 60
  text "+Q Access:",71, 6 68 35 9, tab 60
  button "Add",72, 35 67 15 9, tab 60
  button "Re-",73, 50 67 15 9, tab 60
  text "+O Access:",74, 6 77 35 9, tab 60
  button "Add",75, 35 76 15 9, tab 60
  button "Re-",76, 50 76 15 9, tab 60
  text "Ban >*:",77, 15 86 37 9, tab 60
  button "Add",78, 35 85 15 9, tab 60
  button "Re-",79, 50 85 15 9, tab 60
  text "Ban '*:",80, 17 95 37 9, tab 60
  button "Add",81, 35 94 15 9, tab 60
  button "Re-",82, 50 94 15 9, tab 60
  text "Voice:",83, 17 104 37 9, tab 60
  button "Add",84, 35 103 15 9, tab 60
  button "Re-",85, 50 103 15 9, tab 60
  text "Auto Host:",86, 7 113 37 9, tab 60
  button "Add",87, 35 112 15 9, tab 60
  button "Re-",88, 50 112 15 9, tab 60
  text "Auto +Q:",89, 11 122 37 9, tab 60
  button "Add",90, 35 121 15 9, tab 60
  button "Re-",91, 50 121 15 9, tab 60
  text "Clear:",92, 18 131 37 9, tab 60
  button "clear",93, 35 130 30 9, tab 60
  box "Room Stats",94, 75 60 69 70, tab 60 
  button "&Topic",95, 85 70 50 9, tab 60
  button "&Modes",96, 85 81 50 9, tab 60
  button "&Owners",97, 85 92 50 9, tab 60
  button "&Hosts",98, 85 103 50 9, tab 60
  button "Owner &Stats",99, 85 114 50 9, tab 60
  box "Nullz",100, 3 143 65 37, tab 60
  text "Null +q Pass:",101, 5 153 40 9, tab 60
  button "null",102, 38 152 16 9, tab 60 
  text "Null +o Pass:",103, 5 164 40 9, tab 60
  button "null",104, 38 162 16 9, tab 60
  box "Stuff",105, 75 132 52 48, tab 60
  button "Note&Pad",106, 80 142 41 9, tab 60
  button "Word&Pad",107, 80 153 41 9, tab 60
  button "MS &Paint",108, 80 165 41 9, tab 60
  box "Music",110, 6 17 135 65, tab 109
  button "Play",113,11 38 40 9, tab 109
  button "Directory",114,95 48 40 9, tab 109
  button "Stop",115,95 38 40 9, tab 109
  button "Mp3 List",116, 11 58 40 9, tab 109
  text "",117, 59 69 22 10, center, tab 109
  check "Random",118,11 48 40 9, push, tab 109
  check "Show Chan",119,53 58 65 9, push, tab 109
  check "Continuous",120,53 48 40 9, push, tab 109
  check "Pause",121,53 38 40 9, push, tab 109
  button "\/",122,123 67 12 9, tab 109
  button "/\",123,123 58 12 9, tab 109
  edit "",127, 10 25 125 10, read, autohs, left, tab 109
}

dialog kick-box {
  title "Kick Messages"  
  option dbu
  size -1 -1 140 160
  button "Close",1, 118 147 20 10, OK
  list 2, 3 3 134 130, vsbar size
  edit "",3, 3 133 134 11, autohs
  button "Add",4, 45 147 25 10
  button "Remove",5, 70 147 25 10
  button "Kick",6, 3 147 25 10
}

dialog info2 {
  title "-[haxedro]- info"  
  option dbu
  size -1 -1 65 55
  button "Close",1, 1 46 63 9, ok
  text "-[haxedro]- MSN - mIRC",2, 3 7 63 9 
  text "Client Manager",3, 13 15 55 9
  text "By",4, 27 24 15 9
  text "Icey_Cold",5, 20 32 45 9
  noborder;
}

dialog info1 {
  title "Info"  
  option dbu
  size -1 -1 80 70
  button "ok",1, 5 60 70 9, OK
  text "60 seconds = 1 minute",2, 13 4 60 9
  text "120 seconds = 2 minutes",3, 10 13 60 9
  text "300 seconds = 5 minutes",4, 10 22 60 9
  text "500 seconds = 8.3 minutes",5, 8 31 70 9 
  text "700 seconds = 11.6 minutes",6, 7 40 71 9
  text "900 seconds = 15 minutes",7, 9 49 62 9
  noborder;
}

dialog MP32 {
  title "-[haxedro]- mp3'z"
  option dbu
  size -1 -1 130 180
  button "Close",2,75 212 26 10, cancel
  ;  edit "",5,3 10 120 10, center,autohs, hide
  LIST 7,3 7 125 175,hsbar, vsbar
}

dialog mp3dir {
  option dbu  
  box "Select A Directory",44,0 0 155 70
  title "Select A Directory"
  size -1 -1 155 70
  button "Close",1, 3 50 25 10,ok
  button "Add",2, 3 10 25 10
  button "Erase",3, 3 30 25 10
  list 5,33 8 120 60, sort
}

on *:Dialog:Dialog:init:0: {
  did -a dialog 5 %topic
  did -a dialog 7 %onjoin
  did -a dialog 9 %onpart
  did -a dialog 33 %pass
  did -a dialog 35 %hostkey
  did -a dialog 37 %language
  did -a dialog 26 %key
  did -a dialog 127 %mp3a
}

On *:Dialog:dialog:sclick:25:{ mode $active +l $did( $dname , 26 ).text } }
On *:Dialog:dialog:sclick:28:{ mode $active +k $did( $dname , 29 ).text } }
On *:Dialog:dialog:sclick:40:{ prop $active hostkey $did( $dname , 39 ).text } }
On *:Dialog:dialog:sclick:43:{ prop $active ownerkey $did( $dname , 42 ).text } }
On *:Dialog:dialog:sclick:47:{ topic $active $did( $dname , 46 ).text } }
On *:Dialog:dialog:sclick:50:{ prop $active ONJOIN : $did( $dname , 49 ).text } }
On *:Dialog:dialog:sclick:53:{ prop $active ONPART : $did( $dname , 52 ).text } }
On *:Dialog:dialog:sclick:56:{ prop $active LANGUAGE $did( $dname , 55 ).text } }
On *:Dialog:dialog:sclick:57:{ dialog -m info2 info2 }
On *:Dialog:dialog:sclick:58:{ mode $me +h $$?="-[Enter +q pass here]-" }
On *:Dialog:dialog:sclick:59:{ mode $me +h $$?="-[Enter +o pass here]-" }
On *:Dialog:dialog:sclick:65:{ dialog -m info1 info1 }
On *:Dialog:dialog:sclick:64:{ set %Away.Reason $did( $dname , 63 ).text | set %away.dur $ctime | away %Away.Reason | timeraway 0 $did( $dname , 68 ).text /ame 10i15s st10i15ll 14(15away1015 $+ %Away.Reason $+ 14)10:14(15log1015on14)10:14(15gone1015 $+ $time(h:nn:tt) $+ 14) | /ame 10i15s 14(15away1015 $+ %Away.Reason $+ 14)10:14(15log1015on14)10:14(15gone1015 $+ $time(h:nn:tt) $+ 14) |  }
On *:Dialog:dialog:sclick:66:{ timeraway off | ame 10i15s 14(15back1015 $+ %Away.Reason $+ 14)10:14(15on1015off14)10:14(15gone1015 $+ $duration($calc($ctime - %away.dur)) $+ 14) | away | unset %Away.Reason %Away.Back } 
On *:Dialog:dialog:sclick:72:{ addowner }
On *:Dialog:dialog:sclick:73:{ deowner }
On *:Dialog:dialog:sclick:75:{ addhost }
On *:Dialog:dialog:sclick:76:{ dehost }
On *:Dialog:dialog:sclick:78:{ addguest }
On *:Dialog:dialog:sclick:79:{ deguest }
On *:Dialog:dialog:sclick:81:{ addsysop }
On *:Dialog:dialog:sclick:82:{ desysop }
On *:Dialog:dialog:sclick:84:{ addvoice }
On *:Dialog:dialog:sclick:85:{ devoice }
On *:Dialog:dialog:sclick:87:{ autohost }  
On *:Dialog:dialog:sclick:88:{ dehost }
On *:Dialog:dialog:sclick:90:{ autoowner }
On *:Dialog:dialog:sclick:91:{ deowner }
On *:Dialog:dialog:sclick:93:{ access $active clear }
On *:Dialog:dialog:sclick:95:{ echo -a 12[15The chat topic in $active is12:15 $chan($active).topic $+ 12] }
On *:Dialog:dialog:sclick:96:{ echo -a 12[15The current modes set in $active are12:15 $chan($active).mode $+ 12] }
On *:Dialog:dialog:sclick:97:{ echo -a 12[15There are currently $nick($active $+ ,0,q) owners in $active $+ 12] }
On *:Dialog:dialog:sclick:98:{ echo -a 12[15There are currently $nick($active $+ ,0,o) ops in $active $+ 12] }
On *:Dialog:dialog:sclick:99:{ .gettotnicks }
On *:Dialog:dialog:sclick:102:{ raw -q prop $active ownerkey : }
On *:Dialog:dialog:sclick:104:{ raw -q prop $active hostkey : }
On *:Dialog:dialog:sclick:106:{ run notepad }
On *:Dialog:dialog:sclick:107:{ run wordpad }
On *:Dialog:dialog:sclick:108:{ run mspaint }
On *:Dialog:dialog:sclick:147:{ dialog -md kick-box kick-box }
On *:Dialog:dialog:sclick:11:{
  if ($did(dialog,11).state == 1) { mode $active +m } | else { mode $active -m }
}
On *:Dialog:dialog:sclick:13:{
  if ($did(dialog,13).state == 1) { mode $active +u } | else { mode $active -u }
}
On *:Dialog:dialog:sclick:15:{
  if ($did(dialog,15).state == 1) { mode $active +i } | else { mode $active -i }
}
On *:Dialog:dialog:sclick:17:{
  if ($did(dialog,17).state == 1) { mode $active +h } | else { mode $active -h }
}
On *:Dialog:dialog:sclick:19:{
  if ($did(dialog,19).state == 1) { mode $active +wW } | else { mode $active -wW }
}
On *:Dialog:dialog:sclick:21:{
  if ($did(dialog,21).state == 1) { mode $active +n } | else { mode $active -n }
}
On *:Dialog:dialog:sclick:23:{
  if ($did(dialog,23).state == 1) { mode $active +t } | else { mode $active -t }
}

on *:Dialog:dialog:sclick:158:{ }

on 1:dialog:dialog:init:0: {
  set %mp3d 1
  orale
  did -ra mp3 28 Vol $round($calc(( $vol(mp3) / 650 ) - 1 ),0) $+ %
  if ( %mp3ran == 1 ) did -c mp3 118
  if ( %mp3con == 1 ) did -c mp3 120
  if ( %mp3pau == 1 ) did -c mp3 121
  if ( %mp3r1 == 1 ) did -c mp3 119
}



on 1:dialog:dialog:sclick:*: {
  if ($did == 1) { unset %mp3d }
  if ($did == 113) { /mp3 }
  if ($did == 34) { /mp32 }
  if ($did == 114) { .timer -m 1 10 /dialog -m mp3dir mp3dir }
  if ($did == 23) { .timer -m 1 10 /dialog -m mp31 mp31 }
  if ($did == 24) { .timer -m 1 10 /mp }
  if ($did == 115) { 
    splay -wmp stop
    set %mp3pau 0
    if %mp3d == 1 {
      did -u dialog 115
    }
  }
  if ($did == 116) { .timer -m 1 0 /dialog -m mp32 mp32 }
  if ($did == 29) { mp3bajar 1 }
  if ($did == 30) { mp3subir 1 }
  if ($did == 122) { mp3bajar 2 }
  if ($did == 123) { mp3subir 2 }
  if ($did == 31) {
    if %mp3ran == 1 { set %mp3ran 0 }
    else { set %mp3ran 1 }
  }
  if ($did == 32) {
    if %mp3r1 == 1 { set %mp3r1 0 }
    else { set %mp3r1 1 }
  }
  if ($did == 120) {
    if %mp3con == 1 { set %mp3con 0 }
    else { set %mp3con 1 }
  }
  if ($did == 121) {
    if %mp3pau == 0 { set %mp3pau 1 | splay pause }
    else { set %mp3pau 0 | splay resume }
  }
}

on 1:dialog:mp3dir:init:0: {
  mp3dir2
  if ( $did(mp3dir,5).lines == 0 ) .timer -m 1 10 mp3dir
  if ( $did(mp3dir,5,0).sel == 0 ) did -b mp3dir 3
}

on 1:dialog:mp3dir:sclick:*: {
  if $did == 1 {
    if ( $did(mp3dir,5).lines == 0 ) .timer -m 1 10 mp3dir
    mp3dir1
    if %mp3d == 1 {
      orale
      dialogmp3
    }
  }
  if $did == 2 {
    mp3dira
  }
  if $did == 3 {
    did -d mp3dir 5 $did(mp3dir,5,1).sel
    did -b mp3dir 3
    if ( $did(mp3dir,5).lines == 0 ) .timer -m 1 10 mp3dir
  }
  if $did == 5 {
    did -e mp3dir 3
  }
}

on 1:dialog:mp32:init:0: {
  did -r mp32 7
  :loopd
  if ( ** isin %mp3searchkey ) { set %mp3searchkey $replace(%mp3searchkey,**,*) | goto loopd }
  setmp32
  if ( $exists(mp3search.txt) ) .remove mp3search.txt
  filter -wf @mp32 mp3search.txt 
  set %mp3i 1
  set %mp3j $lines(mp3search.txt)
  :loop
  if ( %mp3j >= %mp3i ) {
    set %mp3searchr $read -nl $+ %mp3i mp3search.txt
    set %mp3searchr1 $nopath(%mp3searchr)
    set %mp3searchr1 $replace(%mp3searchr1,$chr(95),$chr(32))
    did -a mp32 7 %mp3searchr1
    inc %mp3i
    goto loop    
  }
  unset %mp3i
  unset %mp3j
  unset %mp3searchkey
  unset %mp3searchr 
  unset %mp3searchr1
  unset %mp3searchfile
}


on 1:dialog:mp32:dclick:7: {
  set %mp3abc $read -nl $+ $did(7).sel $nopath(mp3search.txt)
  set %mp3a %mp3abc
  splay %mp3a

  if ($fline(@mp32,%mp3a,1) != $null ) {
    set %mp3num $fline(@mp32,%mp3a,1)
  }

  ;  unset %mp3num
  unset %mp3abc
  if %mp3d == 1 orale
  if %mp3r1 == 1 /mp3r1
  dialog -c mp32
  .remove mp3search.txt
  /dialog -v dialog
}

on 1:DIALOG:mp32:sclick:2: {
  .remove mp3search.txt
  /dialog -v dialog dialog
  unset %mp3searchr1
}

;;;;;;;;Menu;;;;;;;;
menu menubar,channel,status {

  .Play:/dialogmp3
  .Fkeys:/echo -a 12F1 14= Random 12F2 14= Mp3 Player 12F3 14= Stop All
}

;;;;;;;;;;;;aliases;;;;;;;;;;;;;

alias -l setmp32 {
  if ( %mp3dir == $null ) /dialog -m mp3dir mp3dir
  /clear -l @mp32
  /window -elhns @mp32
  /clear -l @mp32
  set %mp3player.tmp 0
  while (%mp3player.tmp < $gettok(%mp3dir,0,32)) {
    if $findfile($gettok(%mp3dir,$calc(%mp3player.tmp + 1),32),*.mp3,0,@mp32) !isnum {
      aline @mp32 $findfile($gettok(%mp3dir,$calc(%mp3player.tmp + 1),32),*.mp3,0,@mp32)
    }
    inc %mp3player.tmp
  }
  unset %mp3player.tmp

}

alias -l dialogmp3 {
  if ( $dialog(mp3) ) {
    dialog -o mp3
    dialog -n mp3
  }
  else dialog -md mp3 mp3
}


alias -l mp {
  set %mp3a $sfile($mp3dir Sounds,Take a file,Play!)
  if %mp3a != $null {
    /splay %mp3a
    if %mp3d == 1 {
      orale
    }
  }
  dialog -v mp3

}

alias -l mp3 {
  if %mp3ran == 1 {
    if ( %mp3dir == $null ) /dialog -m mp3dir mp3dir
    set %mp3num.1 $rand(1,$matchtok(%mp3dir,:,0,32))
    set %mp3dirtempo $gettok(%mp3dir,%mp3num.1,32)
    set %mp3num $rand(1,$findfile(%mp3dirtempo,*.mp3,0))
    set %mp3abc $findfile(%mp3dirtempo,*.mp3,%mp3num)
    set %mp3a %mp3abc
    /splay %mp3a
    ;$shortfn(%mp3abc)
    unset %mp3abc
    unset %mp3dirtempo
    unset %mp3num.1
    if %mp3d == 1 orale
    if %mp3r1 == 1 /mp3r1
  }

  if %mp3ran == 0 {
    if ( %mp3dir == $null ) /dialog -m mp3dir mp3dir
    if %mp3num == %mp3count1 { /set %mp3num 0 }
    inc %mp3num
    setmp32
    set %mp3a $line(@mp32,%mp3num)
    /splay %mp3a
    if %mp3d == 1 orale
    if %mp3r1 == 1 /mp3r1

  }
}

alias -l mp32 {
  mp3count
  if ( %mp3dir == $null ) /dialog -m mp3dir mp3dir
  dec %mp3num
  if %mp3num == 0 { 
    set %mp3num %mp3count1
  }
  setmp32
  set %mp3a $line(@mp32,%mp3num)
  /splay %mp3a
  if %mp3d == 1 orale
  if %mp3r1 == 1 /mp3r1
}

alias -l mp3alength {
  set %mp3alength $mp3(%mp3a).length
  set %mp3ablength $int($calc(%mp3alength / 1000))
  set %mp3blength $int($calc(%mp3alength / 60000))
  set %mp3clength $calc(%mp3ablength - (%mp3blength * 60))
  if %mp3clength < 10 {
    set %mp3clength $chr(48) $+ %mp3clength
  }
}

alias -l orale {
  mp3count
  /mp3alength 
  did -ra dialog 5 $replace($nopath(%mp3a),$chr(95),$chr(32))
  did -ra dialog 7  $round($calc(($file(%mp3a).size)/1048576),1)
  did -ra dialog 9  %mp3blength $+ : $+ %mp3clength
  did -ra dialog 11 $mp3(%mp3a).bitrate
  did -ra dialog 13 $calc(($mp3(%mp3a).sample)/1000)
  did -ra dialog 15 $mp3(%mp3abc).bitrate $mp3(%mp3a).mode 
  did -ra dialog 3 %mp3count1
  set %mp3pau 0
  did -u dialog 36
}

alias -l mp3count {
  unset %mp3count 
  unset %mp3count1
  set %mp3player.tmp 0
  while (%mp3player.tmp < $gettok(%mp3dir,0,32)) {
    set %mp3count $addtok(%mp3count,$findfile($gettok(%mp3dir,$calc(%mp3player.tmp + 1),32),*.mp3,0),32)
    inc %mp3player.tmp
  }
  unset %mp3player.tmp
  set %mp3player.tmp 0
  while (%mp3player.tmp < $gettok(%mp3dir,0,32)) {
    set %mp3count1 $calc(%mp3count1 + $gettok(%mp3count,$calc(%mp3player.tmp + 1),32))
    inc %mp3player.tmp
  }
  unset %mp3player.tmp
}

alias -l mp3search {
  did -r mp31 40
  did -r mp31 49
  did -a mp31 49 Searching... Please wait.
  set %mp3searchkey $did(mp31,45)
  set %mp3searchkey $replace(%mp3searchkey,$chr(32),$chr(42))
  set %mp3searchkey $replace(%mp3searchkey,$chr(95),$chr(42))
  set %mp3searchkey $chr(42) $+ %mp3searchkey $+ $chr(42)
  :loopd
  if ( ** isin %mp3searchkey ) { set %mp3searchkey $replace(%mp3searchkey,**,*) | goto loopd }
  /setmp32
  if ( $exists(mp3search.txt) ) .remove mp3search.txt
  filter -wf @mp32 mp3search.txt %mp3searchkey
  set %mp3i 1
  set %mp3j $lines(mp3search.txt)
  :loop
  if ( %mp3j >= %mp3i ) {
    set %mp3searchr $read -nl $+ %mp3i mp3search.txt
    set %mp3searchr1 $nopath(%mp3searchr)
    did -a mp31 40 $replace(%mp3searchr1,$chr(95),$chr(32))
    did -o mp31 49 1 Loading results ( %mp3i of $filtered )... Please wait
    inc %mp3i
    goto loop
  }
  did -r mp31 49
  did -a mp31 49 Results: ( $+ $filtered found)
  unset %mp3i
  unset %mp3j
  unset %mp3searchkey
  unset %mp3searchr 
  unset %mp3searchfile
}

alias -l mp3bajar { /set %mp3vol $calc($vol(mp3) - ( $1 * 5000 )) | /vol -p %mp3vol | /unset %mp3vol | did -ra dialog 28 Vol $round($calc( $vol(mp3) / 650 ),0) $+ % }

alias -l mp3subir { /set %mp3vol $calc($vol(mp3) + ( $1 * 5000 )) | /vol -p %mp3vol | /unset %mp3vol | did -ra dialog 28 Vol $round($calc(($vol(mp3) / 650 ) - 1 ),0) $+ % }

alias -l mp3r1 amsg 14[(15 $+ $replace($nopath(%mp3a),$chr(95),$chr(32)) $+ 14)](15 $+ l/m14/15 $+ $int($calc(%mp3alength / 60000)) $+ : $+ $calc(%mp3ablength - (%mp3blength * 60)) $+ 14/15 $+ $round($calc(($file(%mp3a).size)/1048576),1) $+ mb14/15 $+ Kbps/Khz $+ 14/15 $+ $mp3(%mp3a).bitrate $+ 14/15 $+ $calc(($mp3(%mp3a).sample)/1000) $+ 14)][15Mass Msg14]

alias -l mp3dira {
  /set %mp3dir $shortfn($sdir(c:,"Select your mp3 directory"))
  mp3dir
}
alias -l mp3dir {
  if %mp3dir == $null {
    /set %mp3dir $shortfn($sdir(c:,"Select your mp3 directory"))
  }
  mp3dir2
  if ( $did(mp3dir,5,1) == $null ) did -d mp3dir 5 1
  dialog -v mp3dir
}


alias -l mp3dir1 {
  unset %mp3dir
  set %mp3player.tmp 0
  while (%mp3player.tmp < $did(mp3dir,5).lines) {
    set %mp3dir %mp3dir $did(mp3dir,5,$calc(%mp3player.tmp + 1))
    inc %mp3player.tmp
  }
  unset %mp3player.tmp
}
alias -l mp3dir2 {
  set %mp3player.tmp 0
  while (%mp3player.tmp < $gettok(%mp3dir,0,32)) {
    did -a mp3dir 5 $gettok(%mp3dir,$calc(%mp3player.tmp + 1),32)
    inc %mp3player.tmp
  }
  unset %mp3player.tmp
}

menu Nicklist {
  -=[haxedro]=- NickList:/dialog -md nick nick
}

dialog nick {
  title "NickList"
  option dbu
  size -1 -1 147 200
  button "&Done",2, 13 190 60 9, OK
  button "&Cancel",3, 73 190 60 9, CANCEL
  box "Nicklist",128, 6 83 60 60, tab 109
  text "Owner:",129, 15 90 20 9, tab 109
  button "+q",130, 37 90 20 8, tab 109
  text "De&Owner:",131, 8 98 25 9, tab 109
  button "-q",132, 37 98 20 8, tab 109
  text "Host:",133, 20 106 20 9, tab 109
  button "+o",134, 37 106 20 8, tab 109
  text "De&Host:",135, 13 114 24 9, tab 109
  button "-o",136, 37 114 20 8, tab 109
  text "Spec:",137, 18 122 20 9, tab 109
  button "-v",138, 37 122 20 8, tab 109
  text "De&Spec:",139, 11 130 24 9, tab 109
  button "+v",140, 37 130 20 8, tab 109
  box "Kick Nicklist",141, 70 83 71 60, tab 109
  edit "ShiListed!",142, 73 90 50 10, tab 109, autohs
  button "kick",143, 124 90 15 10, tab 109
  edit "Lata Bitch!",144, 73 100 50 10, tab 109, autohs
  button "kick",145, 124 100 15 10, tab 109
  text "kick with own msg:",146, 83 115 60 9, tab 109
  button "Kick Msg Box",147, 77 124 55 10, tab 109
  box "Access",148, 6 143 135 37, tab 109
  text "Owner Nick:",149, 12 150 30 9, tab 109
  button "Add",150, 46 149 30 9, tab 109
  button "Remove",151, 80 149 30 9, tab 109
  text "Host Nick:",152, 16 159 30 9, tab 109
  button "Add",153, 46 158 30 9, tab 109
  button "Remove",154, 80 158 30 9, tab 109
  text "Deny Nick:",155, 14 168 34 9, tab 109
  button "Add",156, 46 167 30 9, tab 109
  button "Remove",157, 80 167 30 9, tab 109
}

on *:dialog:nick:sclick:130:{ }
on *:dialog:nick:sclick:132:{ }
on *:dialog:nick:sclick:147:{ dialog -md kick kick }

dialog kick {
  title "Kick Box"
  option dbu
  size -1 -1 170 130
  button "&Done", 2, 25 120 60 9, OK
  button "&Cancel", 3, 85 120 60 9, CANCEL
  edit "Kick Message", 4, 33 90 100 10
}
